package cs304.p3.library.exceptions;

@SuppressWarnings("serial")
public class AddBookCopyException extends AbstractLDBException {
	
	private String message;
	
	public AddBookCopyException(String msg, String callNumber) {
		super(msg);
		if(msg != null && !msg.isEmpty()) {
			this.message = msg;
		} else {
			this.message = "Could not add a copy to this book.\nCall Number: " + callNumber;
		}
	}

	@Override
	public String getErrorMessage() {
		return message;
	}

	@Override
	public String getErrorMessageTitle() {
		return "Add Book Error";
	}
	
}
